import Layout from '@/layout'

const order = {
  path: '/order',
  component: Layout,
  redirect: '/order/guestRoom',
  name: 'Order',
  meta: {
    title: 'orderManagement',
    icon: 'form',
    noCache: true
  },
  children: [
    {
      path: 'hotel',
      component: () => import('@/views/order/productOrder/hotel'), // Parent router-view
      name: 'OrderHotel',
      meta: { title: 'orderLists', noCache: true, roles: ['hotel'] },
      children: [
        {
          path: 'OrderDetail',
          component: () => import('@/views/order/productOrder/hotel/children/detail.vue'),
          name: 'OrderDetail',
          meta: { title: 'orderDetails', noCache: true, roles: ['hotel'] },
          hidden: true
        }
      ]
    },
    {
      path: 'ktv',
      component: () => import('@/views/order/productOrder/ktv'), // Parent router-view
      name: 'OrderHotel',
      meta: { title: 'orderList', noCache: true, roles: ['ktv'] },
      children: [
        {
          path: 'OrderDetail',
          component: () => import('@/views/order/productOrder/ktv/children/detail.vue'),
          name: 'OrderDetail',
          meta: { title: 'orderDetails', noCache: true },
          hidden: true
        }
      ]
    },
    {
      path: 'cate',
      component: () => import('@/views/order/productOrder/cate'), // Parent router-view
      name: 'OrderCate',
      meta: { title: 'orderList', noCache: true, roles: ['cate'] },
      children: [
        {
          path: 'OrderDetail',
          component: () => import('@/views/order/productOrder/cate/children/detail.vue'),
          name: 'OrderDetail',
          meta: { title: 'orderDetails', noCache: true },
          hidden: true
        }
      ]
    },
    {
      path: 'scenic',
      component: () => import('@/views/order/productOrder/scenic'), // Parent router-view
      name: 'OrderScenic',
      meta: { title: 'orderList', noCache: true, roles: ['scenic'] },
      children: [
        {
          path: 'OrderDetail',
          component: () => import('@/views/order/productOrder/scenic/children/detail.vue'),
          name: 'OrderDetail',
          meta: { title: 'orderDetails', noCache: true },
          hidden: true
        }
      ]
    },
    {
      path: 'other',
      component: () => import('@/views/order/productOrder//other'), // Parent router-view
      name: 'OrderOther',
      meta: { title: 'orderList', noCache: true, roles: ['other'] },
      children: [
        {
          path: 'OrderDetail',
          component: () => import('@/views/order/productOrder/other/children/detail.vue'),
          name: 'OrderDetail',
          meta: { title: 'orderDetails', noCache: true },
          hidden: true
        }
      ]
    },
    {
      path: 'singleOrder',
      component: () => import('@/views/order/singleOrder'), // Parent router-view
      name: 'SingleOrder',
      meta: { title: 'singleOrder', noCache: true },
      children: [
        {
          path: 'OrderDetail',
          component: () => import('@/views/order/singleOrder/children/detail.vue'),
          name: 'singleDetail',
          meta: { title: 'singleDetail', noCache: true },
          hidden: true
        }
      ]
    },
    {
      path: 'offline',
      component: () => import('@/views/order/offline'), // Parent router-view
      name: 'offlineOrder',
      meta: { title: 'offline', noCache: true },
      children: [
        {
          path: 'OrderDetail',
          component: () => import('@/views/order/offline/children/detail.vue'),
          name: 'offlineDetail',
          meta: { title: 'singleDetail', noCache: true },
          hidden: true
        }
      ]
    },
    {
      path: 'storeValue',
      component: () => import('@/views/order/storevalue'), // Parent router-view
      name: 'storeValueOrder',
      meta: { title: 'storeValue', noCache: true },
      children: [
        {
          path: 'OrderDetail',
          component: () => import('@/views/order/storevalue/children/detail.vue'),
          name: 'storevalueDetail',
          meta: { title: 'singleDetail', noCache: true },
          hidden: true
        }
      ]
    },
    {
      path: 'roomTime',
      component: () => import('@/views/order/roomTime'),
      meta: { title: 'roomTime', noCache: true, roles: ['hotel'] },
      name: 'RoomTime',
      children: [
        {
          path: 'roomTimeDetails',
          component: () => import('@/views/order/roomTime/children/detail.vue'),
          name: 'roomTimeDetails',
          meta: { title: 'roomTimeDetails', noCache: true },
          hidden: true
        }
      ]
    },
    {
      path: 'chargeOff',
      component: () => import('@/views/order/chargeOff'),
      meta: { title: 'chargeOff', noCache: true },
      name: 'ChargeOff'
    },
    {
      path: 'evaluate',
      component: () => import('@/views/order/evaluate'),
      meta: { title: 'evaluateList', noCache: true },
      name: 'Evaluate',
      children: [
        {
          path: 'evaluateDetail',
          component: () => import('@/views/order/evaluate/children/detail.vue'),
          name: 'EvaluateDetail',
          meta: { title: 'evaluateDetails', noCache: true },
          hidden: true
        }
      ]
    }
  ]
}

export default order
